//
//  ApplyRefundTwoVC.m
//  CenturyCity
//
//  Created by beisheng03 on 2018/1/17.
//  Copyright © 2018年 beisheng. All rights reserved.
//

#import "ApplyRefundTwoVC.h"
#import "RefundFooterVeiw.h"
#import "ForRefundTopCell.h"
@interface ApplyRefundTwoVC ()
@property (nonatomic, strong) RefundFooterVeiw *footerView2;

@end

@implementation ApplyRefundTwoVC


- (ApplyRefundParmModel *)parmModel{
    if (!_parmModel) {
        _parmModel = [[ApplyRefundParmModel alloc]init];
    }
    
    
    return _parmModel;
}

- (RefundFooterVeiw *)footerView2{
    
    if (!_footerView2) {
        
        RefundFooterVeiw *temp = (RefundFooterVeiw *)[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([RefundFooterVeiw class]) owner:nil options:nil].firstObject;
        
        _footerView2 = temp;
        
    }
    
    return _footerView2;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    [self setNav];
    
    self.tableView.backgroundColor = viewBgGrey;
    
    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;

    [self.tableView registerClass:[BaseTableViewCell class] forCellReuseIdentifier:[BaseTableViewCell identifierStr]];
    
    [self.tableView registerNib:[UINib nibWithNibName:NSStringFromClass([ForRefundTopCell class]) bundle:nil] forCellReuseIdentifier:[ForRefundTopCell identifierStr]];
    
    self.tableView.tableFooterView = self.footerView2;

    // Do any additional setup after loading the view.
}

- (void)back{
    
    
    
    [self dismissViewControllerAnimated:YES completion:nil];
}


- (void)setNav{
    
    self.navigationItem.title = @"申请退款";
    UIButton *but = [UIButton buttonWithType:UIButtonTypeCustom];
    [but setImage:[UIImage imageNamed:@"nav_back"] forState:UIControlStateNormal];
    [but setImage:[UIImage imageNamed:@"nav_back"] forState:UIControlStateHighlighted];
    
    [but addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside];
    
    
    but.imageView.contentMode = UIViewContentModeScaleAspectFit;
    
    //        but.backgroundColor = [UIColor redColor];
    
    but.frame = CGRectMake(0, 0, 44, 44);
    but.contentEdgeInsets = UIEdgeInsetsMake(11, -10, 11, 22);
    
    UIBarButtonItem *returnButtonItem = [[UIBarButtonItem alloc]initWithCustomView:but];
    
    
    self.navigationItem.leftBarButtonItem = returnButtonItem;
}





#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    
 
        return 1;
    
    
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    

        
        
        ForRefundTopCell *tableCell = [tableView dequeueReusableCellWithIdentifier:[ForRefundTopCell identifierStr]];
        
        tableCell.model = self.parmModel;
        
        return tableCell;
        
   
    
    
    
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    

        
        return 90;
 
    
    
    
    
    
    
}



- (void)viewWillAppear:(BOOL)animated
{
    
    [super viewWillAppear:animated];
    
    
    
    [self.navigationController setNavigationBarHidden:NO animated:YES];
    
    
    
    
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
